local unitDefs = {

C_CRUISER = {
  name                = "Cruiser",
  description         = "Cruiser",
  
  objectName          = "c_escortship.s3o",  --"c_cruiser.s3o" 
  script              = "c_escortship.lua",  --"c_cruiser.lua"
  buildPic            = "c_escortship.png",  --"c_cruiser.png"
  iconType            = "ship",  
  category            = [[WATER SHIP WEAPON]],  --LEVEL1 NOTAIR
  TEDClass            = "SHIP", 
  movementClass       = "SHIP7",
  
  -- Cost
  buildCostMetal      = 100,   --1500
  buildCostEnergy     = 0,
  buildTime           = 1000,  --15000,
  power               = 1500,

  -- Damage
  maxDamage           = 8900,
  idleAutoHeal        = 5,
  idleTime            = 900,

  -- Flanking Bonus
  flankingBonusMode   = 3,
  flankingBonusDir    = [[0 0 1]],
  flankingBonusMin    = 0.9,
  flankingBonusMax    = 1.1,

  -- Collision Volume
  collisionVolumeType    = "ellipsoid", 
  collisionVolumeTest    = 1,  
  collisionVolumeOffsets = [[0 0 5]],
  collisionVolumeScales  = [[30 35 175]],
  modelCenterOffset      = [[0 0 12.6683]],
  
  -- Movement and Pathfinding
  footprintX          = 7,
  footprintZ          = 7,  
  maxVelocity         = 2.2,
  maxReverseVelocity  = 0.25,
  acceleration        = 0.03,
  brakeRate           = 0.03,
  turnRate            = 110,
  turnInPlace         = false,
  minWaterDepth       = 15, 

  -- Abilities
  canMove             = true,  
  canAttack           = true,
  canGuard            = true,
  canPatrol           = true,
  floater             = true,  
  activateWhenBuilt   = true,

  -- Detection  
  sightDistance       = 660,
  radarDistance       = 1300,
  sonarDistance       = 660,  
  seismicSignature    = 0,  

  -- Weapons
  explodeAs           = "UNIT_EXPLOSION_MEDIUM1",  
  selfDestructAs      = "UNIT_SELFD_MEDIUM1", 
  noChaseCategory     = [[PLANE HELICOPTER]],  

  weapons = {
    [1] = { def = "C_CANNON_CRUISER"          , mainDirAngle =   0, maxAngleDif = 270, },
    [2] = { def = "C_CANNON_CRUISER"          , mainDirAngle =   0, maxAngleDif = 250, },
    [3] = { def = "C_CANNON_CRUISER"          , mainDirAngle = 180, maxAngleDif = 270, },
    [4] = { def = "C_CANNON_DESTROYER_1BARREL", mainDirAngle =  85, maxAngleDif = 190, rangeCircle = true, },
    [5] = { def = "C_CANNON_DESTROYER_1BARREL", mainDirAngle = -85, maxAngleDif = 190, },
  -- [6] = { def = "C_TORPEDO_SINGLE"          , mainDirAngle =  90, maxAngleDif = 120, rangeCircle = true, },
  -- [7] = { def = "C_TORPEDO_SINGLE"          , mainDirAngle = -90, maxAngleDif = 120, },
    -- [8] = "C_DEPTH_CHARGE_THROWER",
    -- [9] = "C_DEPTH_CHARGE_THROWER",
    -- [10] = "C_DEPTH_CHARGE_THROWER",
    -- [11] = "C_DEPTH_CHARGE_THROWER",
  },
  
  sfxtypes = {
    explosiongenerators = {
      "custom:FLARE_CANNON_LIGHT",  --"custom:FLARE_CANNON_HEAVY",
    },
  },

  customParams = {
    wreckModels = { "c_escortship.s3o", "c_escortship.s3o" },  --"c_cruiser_wreck1.s3o", "c_cruiser_wreck2.s3o"
    heapModels = { "3x3d.3do" },

	  soundCategory = "SHIP1",
  
	  armorThickness = 100,
	
	  lightDamageChance = 0.4,	
	  mediumDamageChance = 0.3,
	  heavyDamageChance = 0.3,
  },
},
}

return lowerkeys(unitDefs)